<?php

/*** @version $Id: controller.php 18 2009-12-07 11:22:56Z truongnhan0311 $
 * @author truongnhan0311* 
 * @package	wrd component*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

if(!defined('DS')){
	define('DS',DIRECTORY_SEPARATOR);
}

date_default_timezone_set('Asia/Ho_Chi_Minh');
//error_reporting(0);

jimport('joomla.application.component.model');
jimport('joomla.application.component.controller');
require_once JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'route.php';
require_once( JPATH_COMPONENT_ADMINISTRATOR.DS.'classes'.DS.'utilities'.DS.'utilitiesProvider.php');

// set tables directory
JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'tables');
JHTML::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'html');


JModelLegacy::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'models');
JLoader::register('WrdLog', JPATH_COMPONENT_ADMINISTRATOR.DS.'classes'.DS.'log.php');
JLoader::register('WrdView', JPATH_COMPONENT_ADMINISTRATOR.DS.'classes'.DS.'view.php');
JLoader::register('WrdModel', JPATH_COMPONENT_ADMINISTRATOR.DS.'classes'.DS.'model.php');
JLoader::register('WrdHelper', JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'wrd.php');

// Launch the controller.

$controller = JControllerLegacy::getInstance('wrd');
$task = JRequest::getVar('task', 'display');
$controller->execute(JRequest::getCmd('task', $task));
$controller->redirect();

?>